isActive和hasError都是bool类型,如果isActive为true那么就会class后面的字符串就会变成class="statis active",如果isActive为false,hasError为true的话,就会变成
class="static text-danger"

<div
  class="static"
  v-bind:class="{ active: isActive, 'text-danger': hasError }"
></div>


<script>
data: {
  isActive: true,
  hasError: false
}
<\script>